package com.pets.web.controller.api;


import com.pets.common.core.controller.BaseController;
import com.pets.common.core.domain.AjaxResult;
import com.pets.common.core.page.TableDataInfo;
import com.pets.web.entity.PetExpress;
import com.pets.web.service.IPetExpressService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * <p>
 * 物流信息表 前端控制器
 * </p>
 *
 * @author zhurenwang
 * @since 2024-05-29
 */
@Api(tags = "物流相关接口")
@Validated
@RestController
@RequestMapping("/api/express")
public class ApiPetExpressController extends BaseController {

    @Autowired
    private IPetExpressService petExpressService;

    @ApiOperation("物流详情")
    @GetMapping("/{orderNo}")
    public List<PetExpress> detail(@PathVariable @NotBlank(message = "订单id不能为空") String orderNo){
        return petExpressService.detail(orderNo);
    }

}
